
{extend name="layout"}
{block name="body"}
    
    <section class="wld-content">
        <div class="page_title">导入增员</div>
        <div class="page_title_obj">
            <a class="go_back" href="{:url('index/increase/index')}">返回到增员办理</a>
            
        </div>
        <div class="con_box layui-form">
			<div class="upload-con"  >
				<div class="upload-btn">
					<div>
						<span>
							<i class="iconfont iconshangchuan"></i>
						</span>
						
					</div>
					<p>点击上传增员文件</p>
				</div>
			</div>
			<div class="tips-con">
				<p class="tips-title"><i class="iconfont icontishi"></i>温馨提示</p>
				<p class="">1.请使用标准模板进行导入，立即<a href="{:url('index/increase/download')}"><i class="iconfont iconxiazai" style="font-size: 14px;"></i>下载标准模板</a></p>
				<p class="">2.导入前请仔细检查员工身份证号，导入后身份证号无法更改</p>
				
			</div>
		</div>
		<div class="con_box add_success" >
			<img src="__ROOT__/static/index/img/importResult.png" >
			<p class="title">导入结果</p>
			<div class="con">
				<div>
					<p>本次共导入成功<span style="color: #61d288;">0</span>人，导入失败<span style="color: #ff6d5a;">0</span>人<span class="error_result">，查看<a href="#">错误结果文件</a></span></p>
					<p style="padding-top: 10px;" >审核中可以编辑，审核后无法修改</p>

				</div>
				
			</div>
		   <div class="btn">
			   <a href="{:url('index/increase/index')}">返回列表</a>
			   <a href="{:url('index/increase/import')}">再次导入</a>
		   </div> 
		</div>
	</section>
	
{/block}

{block name="style"}
<style lang="less">
	.add_success{
		display: none;
	}
	div.con>div{
		display: inline-block;
		color: #9c9cae;
	}
	.con span{
		display: inline-block;
		padding: 0 5px;
	}
	.con a{
		float: right;
		padding-left: 5px;
		color: #61cad7;
		text-decoration: underline;
	}
	.con a:hover{
		
		color: #42c2d2;
		
	}

	.con_box{
		padding: 34px 45px 100px 45px;
	}
	.upload-btn{
		border: 1px dashed #e5e5ed ;
		padding: 58px 0;
		text-align: center;
		cursor: pointer;
	}
	.upload-btn span{
		width: 60px;
		line-height: 60px;
		height: 60px;
		display: inline-block;
		background: #f5f5fb;
		border-radius: 10px;
		transition: all 0.3s;
	}
	.upload-btn i{
		font-size: 36px;
		color: #9c9cae;
		
	}
	.upload-btn p{
		font-size: 14px;
		color: #9c9cae;
		padding-top: 10px;

		
	}
	.upload-btn:hover span{
		background: #42c2d2;
	}
	.upload-btn:hover i{
		color: #fff;
	}
	.upload-btn:hover p{
		color: #42c2d2;
	}
	.tips-con {
		padding-top: 2px;
	}
	.tips-con p{
		padding-top: 25px;
	}
	.tips-con i{
		color: #42c2d2;
		padding-right: 5px;
	}
	.tips-con a{
		display: inline-block;
		margin-left: 14px;
		font-size: 12px;
		border-radius: 5px;
		line-height: 32px;
		padding: 0 15px;
		cursor: pointer;
		background: #e7f7f9;
    	color: #61cad7;

	}
	.tips-con a:hover{
		color: #42c2d2;
	}

	
</style>
{/block}
{block name="script"}
<script>
 layui.use('upload', function(){
        var upload = layui.upload;
        
        //执行实例
        var uploadInst = upload.render({
            elem: '.upload-con' //绑定元素
            ,url: "{:url('upload')}" //上传接口
            ,accept:"file"
            ,choose: function(obj){   
					$.msg.loading();
             }
            ,done: function(res){
			//上传完毕回调
				layer.closeAll();
            	if(res.code == 1){
            		$('.con p span').eq(0).html(res.data.suss_num);
            		$('.con p span').eq(1).html(res.data.err_num);
					$(".con a").attr("href","/index/increase/exporterr?list="+res.data.err_file);
					if(!res.data.err_num){
						$(".error_result").html("。");
					}
					$(".layui-form").hide();
					$(".add_success").show();
                   
            	}else{
					$.msg.error(res.info,1)
				}
            }
            ,error: function(){
            //请求异常回调
            }
        });
        });

</script>
{/block}




